<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>设置 GreenChrome</title>
    <link id="favicon" rel="icon" type="image/png" href="static/favicon.png">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <meta name="format-detection" content="telephone=no"/>
    <link href="static/bootstrap.min.css" rel="stylesheet">
    <link href="static/bootstrap-colorpicker.min.css" rel="stylesheet">
    <link href="static/bootstrap-select.min.css" rel="stylesheet">
    <style>
      body {
        font-family: 'Segoe UI',Arial,'Microsoft Yahei',sans-serif;
      }
      h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, .lead, a, .a, label, option, input, span, select, button, textarea, div {
        font-family: 'Segoe UI',Arial,'Microsoft Yahei',sans-serif;
      }
    </style>
  </head>
  <body spellcheck="false">
    <div class="container">
      <div class="row">
        <div class="col-sm-2 hidden-sm hidden-xs">
          <h2></h2>
          <ul class="nav nav-pills nav-stacked affix">
            <li><a href="#base-setting">基本设置</a></li>
            <li><a href="#UI-enhance">界面增强</a></li>
            <li><a href="#append-command">追加参数</a></li>
            <li><a href="#start-run">启动时运行</a></li>
            <li><a href="#end-run">关闭时运行</a></li>
            <li><a href="#mouse-gesture">鼠标手势</a></li>
            <li><a href="#check-update">Chrome更新</a></li>
          </ul>
        </div>

        <div class="col-sm-12 col-md-8">

          <h2>设置 GreenChrome</h2>
          <div class="well well-sm">
            <div>GreenChrome是一个由 <a class="alert-link" href="https://www.shuax.com/?greenchrome" target="_blank">shuax</a> 开发的增强Chrome的免费工具</div>
            <div>路径支持 <code>%appdata%</code> 这样的环境变量，特别的 <code>%app%</code> 代表程序当前所在目录</div>
            <div>你也可以打开程序目录下的 <code>GreenChrome.ini</code> 配置文件手动修改</div>
          </div>
          <div class="alert alert-warning">
            <div>部分设置需要重新启动浏览器后才能生效</div>
          </div>
          <div class="alert alert-danger hide">
            <div id="debug">当前无法连接到GreenChrome设置</div>
          </div>
          <div class="alert alert-success hide">
            <div id="update_tips">GreenChrome已有新版本，请访问 <a href="https://www.shuax.com/archives/ChromeUpdater.html" target="_blank">官方网站</a> 获取</div>
          </div>

          <a name="base-setting"></a>
          <h4>基本设置</h4>
          <div class="row">
            <div class="col-xs-offset-0 col-xs-11">

              <div class="form-inline">
                <div class="form-control-static">数据目录：</div>
                <input type="text" class="form-control kv" style="width:70%;" id="UserData" data-section="基本设置" data-name="数据目录">
                <div class="text-muted">　类似<code>--user-data-dir</code>强制重定向用户数据目录，但不会导致双图标</div>
                <p class="text-muted">　如果是安装版用户，清空此选项即可使用原有数据</p>
              </div>

              <div class="form-inline">
                <p class="form-control-static">老板键：</p>
                <input type="text" class="form-control kv" style="width:70%;" id="BossKey" data-section="基本设置" data-name="老板键">
                <p class="text-muted">　按下老板键后可隐藏所有Chrome窗口，再次按下即可恢复</p>
              </div>

              <div class="form-inline">
                <p class="form-control-static">新标签页面：</p>
                <input type="text" class="form-control kv" style="width:70%;" id="HTMLFile" data-section="基本设置" data-name="新标签页面">
                <div class="text-muted">　可以自定义新标签页为本地html文件，不填不修改，推荐使用<code>%app%</code>来指定位置</div>
                <div class="text-muted">　文件只能<code>1k</code>左右，超过部分会被自动截断</div>
                <div class="text-muted">　有个内置的演示效果，名字为<code>%demo%</code></div>
                <p class="text-muted">　还可以直接填写<code>http</code>开头的网址，将由iframe显示</p>
              </div>

              <div class="checkbox">
                <label>
                  <input type="checkbox" id="RemoveUpdateError" data-section="基本设置" data-name="移除更新错误">
                  移除更新错误
                </label>
                <div class="text-muted">　　离线包不带更新程序，点开关于时会有错误，此选项可关闭错误显示</div>
              </div>

              <div class="checkbox">
                <label>
                  <input type="checkbox" id="KillAtEnd" data-section="基本设置" data-name="自动结束运行程序">
                  自动结束运行程序
                </label>
                <div class="text-muted">　　在Chrome关闭时自动结束启动时运行的程序</div>
              </div>

              <div class="checkbox">
                <label>
                  <input type="checkbox" id="MakePortable" data-section="基本设置" data-name="便携化">
                  便携化
                </label>
                <div class="text-muted">　　可以打造便携版绿色Chrome，防止更换电脑时重置个人设置</div>
                <div class="text-danger">　　一旦用户数据生成，修改此选项会导致用户数据失效</div>
              </div>

            </div>
          </div>

          <a name="UI-enhance"></a>
          <br><h4>界面增强</h4>
          <div class="row">
            <div class="col-xs-offset-0 col-xs-11">

              <div class="checkbox">
                <label>
                  <input type="checkbox" id="DoubleClickCloseTab" data-section="界面增强" data-name="双击关闭标签页">
                  双击关闭标签页
                </label>
                <div class="text-muted">　　直接在标签上双击就可以关闭页面</div>
              </div>

              <div class="checkbox">
                <label>
                  <input type="checkbox" id="RightClickCloseTab" data-section="界面增强" data-name="右键关闭标签页">
                  右键关闭标签页
                </label>
                <div class="text-muted">　　开启此选项时，按住 <kbd>SHIFT</kbd> 再右键依然可以打开菜单</div>
              </div>

              <div class="checkbox">
                <label>
                  <input type="checkbox" id="HoverActivateTab" data-section="界面增强" data-name="悬停激活标签页">
                  悬停激活标签页
                </label>
                <div class="text-muted">　　鼠标悬停在标签页一定时间将会自动激活标签页</div>

                <div class="form-inline">
                  <div class="form-control-static">　　悬停时间：</div>
                  <input type="text" class="form-control kv" id="HoverTime" data-section="界面增强" data-name="悬停时间">
                  <div class="form-control-static text-muted">悬停多久后激活标签页，单位毫秒，不填为系统默认值</div>
                </div>
              </div>

              <div class="checkbox">
                <label>
                  <input type="checkbox" id="KeepLastTab" data-section="界面增强" data-name="保留最后标签">
                  保留最后标签
                </label>
                <div class="text-muted">　　防止关闭最后的标签时关闭整个浏览器（新建标签）</div>
                <div class="text-muted">　　手动点击关闭按钮时无法阻止</div>
              </div>

              <div class="checkbox">
                <label>
                  <input type="checkbox" id="HoverTabSwitch" data-section="界面增强" data-name="悬停快速标签切换">
                  悬停快速标签切换
                </label>
                <div class="text-muted">　　鼠标悬停在标签栏时，滚动鼠标可切换标签</div>
              </div>

              <div class="checkbox">
                <label>
                  <input type="checkbox" id="RightTabSwitch" data-section="界面增强" data-name="右键快速标签切换">
                  右键快速标签切换
                </label>
                <div class="text-muted">　　按住鼠标右键时，滚动鼠标可切换标签</div>
                <div class="text-muted">　　这个功能会影响鼠标手势（GreenChrome自带的不受影响）</div>
              </div>

              <div class="checkbox">
                <label>
                  <input type="checkbox" id="BookMarkNewTab" data-section="界面增强" data-name="新标签打开书签">
                  新标签打开书签
                </label>
                <div class="text-muted">　　点击书签在新标签中打开，不支持文件夹中的书签</div>
              </div>

              <div class="checkbox">
                <label>
                  <input type="checkbox" id="OpenUrlNewTab" data-section="界面增强" data-name="新标签打开网址">
                  新标签打开网址
                </label>
                <div class="text-muted">　　地址栏输入的网址在新标签中打开</div>
              </div>

              <div class="checkbox">
                <label>
                  <input type="checkbox" id="NotBlankTab" data-section="界面增强" data-name="新标签页不生效">
                  新标签页不生效
                </label>
                <div class="text-muted">　　当前页面是新标签页时，新标签打开书签、新标签打开网址 不生效</div>
              </div>

              <div class="checkbox">
                <label>
                  <input type="checkbox" id="FrontNewTab" data-section="界面增强" data-name="前台打开新标签">
                  前台打开新标签
                </label>
                <div class="text-muted">　　新标签打开书签 的新标签页将会打开在前台</div>
              </div>

            </div>
          </div>


          <a name="append-command"></a>
          <br><h4>追加参数</h4>

          <div class="row">
            <div class="col-xs-offset-0 col-xs-11">
              <div class="text-muted">这里定义的<a href="https://www.baidu.com/s?wd=chrome命令行参数" target="_blank">Chrome命令行参数</a>，可在Chrome启动时自动插入</div>
              <ul class="list-group" id="additional_parameter">
                <!-- <li class="list-group-item">disable-directwrite-for-ui<a href="#"><span class="glyphicon glyphicon-remove pull-right"></span></a></li> -->
              </ul>
              <div class="input-group">
                <input type="text" class="form-control" placeholder="输入您要追加的参数">
                <span class="input-group-btn">
                  <button class="btn btn-primary add_section" type="button" data-section="追加参数">增加</button>
                </span>
              </div>
            </div>
          </div>

          <a name="start-run"></a>
          <br><h4>启动时运行</h4>

          <div class="row">
            <div class="col-xs-offset-0 col-xs-11">
              <div class="text-muted">这里的程序会随Chrome一起启动，如果路径有空格需要添加引号</div>
              <div class="text-muted">如果<code>%app%</code>之类的展开后含有空格，也是需要添加引号的</div>
              <ul class="list-group" id="start_program">
              </ul>
              <div class="input-group">
                <input type="text" class="form-control" placeholder="输入您要启动时运行的程序">
                <span class="input-group-btn">
                  <button class="btn btn-primary add_section" type="button" data-section="启动时运行">增加</button>
                </span>
              </div>
            </div>
          </div>

          <a name="end-run"></a>
          <br><h4>关闭时运行</h4>

          <div class="row">
            <div class="col-xs-offset-0 col-xs-11">
              <div class="text-muted">这里的程序会在Chrome关闭时启动（隐藏执行）</div>
              <div class="text-muted">通常用于清理一些残留程序，例如结束Lantern后取消系统代理</div>
              <ul class="list-group" id="close_program">
              </ul>
              <div class="input-group">
                <input type="text" class="form-control" placeholder="输入您要关闭时运行的程序">
                <span class="input-group-btn">
                  <button class="btn btn-primary add_section" type="button" data-section="关闭时运行">增加</button>
                </span>
              </div>
            </div>
          </div>

          <a name="mouse-gesture"></a>
          <br><h4>鼠标手势</h4>
          <div class="row">
            <div class="col-xs-offset-0 col-xs-11">

              <div class="checkbox">
                <label>
                  <input type="checkbox" id="MouseGesture" data-section="鼠标手势" data-name="启用">
                  启用
                </label>
                <div class="text-muted">　　关闭后可以使用别的鼠标手势软件（还得关闭右键快速标签切换）</div>
              </div>

              <div class="checkbox">
                <label>
                  <input type="checkbox" id="GestureTrack" data-section="鼠标手势" data-name="轨迹">
                  轨迹
                </label>
                <div class="text-muted">　　是否显示鼠标轨迹</div>
              </div>

              <div class="form-inline">
                <div class="form-control-static">轨迹粗细：</div>
                <input type="text" class="form-control kv" id="TrackThickness" data-section="鼠标手势" data-name="轨迹粗细">
                <div class="form-control-static">轨迹颜色：</div>
                <div id="colorpicker" class="input-group" data-section="鼠标手势" data-name="轨迹颜色">
                  <input type="text" value="#00AABB" class="form-control"/>
                  <span class="input-group-addon"><i></i></span>
                </div>
              </div>

              <div class="checkbox">
                <label>
                  <input type="checkbox" id="GestureResult" data-section="鼠标手势" data-name="动作">
                  动作
                </label>
                <div class="text-muted">　　是否显示识别结果</div>
              </div>

              <h5>鼠标手势管理
              <small>
                <span class="text-muted">支持四个手势方向：<kbd>↑</kbd> <kbd>↓</kbd> <kbd>←</kbd> <kbd>→</kbd></span>
              </small>
              </h5>
              <div class="table-responsive">
                <table class="table table-hover table-condensed">
                  <thead>
                    <tr>
                      <th>方向</th>
                      <th>名称</th>
                      <th>动作（<a href="https://support.google.com/chrome/answer/157179?hl=zh-Hans" target="_blank">键盘快捷键</a>）</th>
                      <th></th>
                    </tr>
                  </thead>
                  <tbody id="MouseGestureList">
                  </tbody>
                </table>
              </div>

            </div>
          </div>

          <a name="check-update"></a>
          <h4>检查 Chrome 更新</h4>
          <div class="row">
            <div class="col-xs-offset-0 col-xs-11">

              <div class="form-inline">
                <p class="form-control-static">检查版本：</p>
                <select id="branch" class="selectpicker">
                  <option value="Stable">稳定版 Stable</option>
                  <option value="Beta">测试版 Beta</option>
                  <option value="Dev">开发版 Dev</option>
                  <option value="Canary">金丝雀 Canary</option>
                </select>
                <select id="arch" class="selectpicker">
                  <option value="x86">32位 x86</option>
                  <option value="x64">64位 x64</option>
                </select>
              </div>

              <div class="form-inline">
                <p class="form-control-static">更新器地址：</p>
                <input type="text" class="form-control kv" style="width:70%;" id="ChromeUpdater" data-section="检查更新" data-name="更新器地址">
                <div class="text-muted">　如果不需要每次启动chrome自动检查更新，就直接清空这个数据</div>
                <p class="text-muted">　如果你想手动更新，可访问 <a href="https://api.shuax.com/tools/getchrome" target="_blank">这里</a> 下载Chrome离线安装包</p>
              </div>

            </div>
          </div>

          <h4></h4>

        </div>
      </div>
    </div>
    <script src="static/jquery.min.js"></script>
    <script src="static/bootstrap.min.js"></script>
    <script src="static/bootstrap-colorpicker.min.js"></script>
    <script src="static/bootstrap-select.min.js"></script>
    <script src="static/setting.js?5.9.8"></script>
  </body>
</html>
